<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>Hello MUI</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">

		<!--标准mui.css-->
		<link rel="stylesheet" href="../css/mui.min.css">
		<!--App自定义的css-->
		<link rel="stylesheet" type="text/css" href="../css/app.css" />
		<style type="text/css">
			.message { background-color: #fff;z-index: 99;box-shadow: 0px -5px 5px 0px rgba(150, 150, 150, .2);} 
			.message.bottom {position: fixed;padding: 5px;bottom: 0;left: 0px;right: 0px;}
			.message.top {position: fixed;padding: 5px;top: 0;left: 0px;right: 0px;} 
			.radio_inline{ display: inline-block;  width: 65%; }  
			.radio_inline label{  width: 45%;  padding-left: 30px; padding-right: 20px;  }  
			.radio_inline input[type=radio]{  width: 15%;right: auto; }   
			.mui-table-view-cell{padding:0 15px;position :static}
		</style>
	</head>

	<body class="body-class">
		<div id="mainDiv">
				<div class="message top">
					<input id="pkNo" type="text" class="mui-input-clear" placeholder="盘库单号">
				</div>
				<div  style="height:5rem" >
				</div>
				<div class="mui-content" id="mui-content-id">
				</div>
			    <div style="height:5rem" ></div>
		</div>
		
	
		<div class="message bottom">
			<div id="addDiv" class="mui-card  " style="display:none" > 
				<ul class="mui-table-view">
					<li class="mui-table-view-cell "> 
						<input type="text" id="boxCode" placeholder="托盘条码" class="mui-navigate-right"> 
				    </li> 
					<li class="mui-table-view-cell "> 
							<input type="text" id="itemName" placeholder="物料"> 
							<form class="mui-input-group">
								<div id="itemOption">  	 
								 </div>
							 </form> 
					</li> 
					<li class="mui-table-view-cell "> 
							<input type="text" id="batchNo" placeholder="批次" class="mui-navigate-right"> 
					</li> 
					<li class="mui-table-view-cell "> 
							<input type="text" id="dbCount" placeholder="数量" class="mui-navigate-right"> 
					</li>

				<!-- <li class="mui-table-view-cell mui-collapse">
						<a class="mui-navigate-right" href="#">单位</a>
						<form class="mui-input-group">
							<div class="mui-collapse-content" id="unitsOption"> 
							</div>
						</form>
					</li> -->
				</ul> 

			</div>
			<button id="saveButton" type="button" class="mui-btn mui-btn-block mui-btn-primary">新增</button>
		</div>
		<script src="../js/mui.js"></script>
		<script src="kj.js"></script>
		<script src="pk.js"></script>
	</body>
<script type="text/javascript" charset="utf-8">   
	 function loadData(){
		 var pkNo=	document.getElementById("pkNo").value;
		 if(pkNo.length<=4){
			 return;
		 }
		 myGet("pda/getPKCSD/"+pkNo,  function(list) {
		    document.body.querySelector('#mui-content-id').innerHTML=""  
		 	for(var i=0;i<list.length;i++){
				var d=list[i];  
				 if(d.status==47){
					continue;
				}  
				var innerHTML = '<div class="mui-card-content mui-card-content-inner">'
					+'<div style="display:inline;">'+ getItem(d.itemId)+'</div>'
					+'<span   style="display:inline;float:right" >'+(d.status==48? "盘盈":"")+'</span>'
					+'</div>'
					+'<div class="mui-card-footer">'+d.countDb+units[d.unit]
						+'<span   style="display:inline;float:right" >'+"条码:"+d.boxCode+"   位置:"+d.locId +'</span>'
					+'</div>'
				addMuiCard(innerHTML,d)
		 	} 		 
		 } );
		 mui.toast(pkNo);
		 
	 }
	 
	 document.getElementById("pkNo").addEventListener('input', function(event) { loadData(); }, false);
	 document.getElementById("boxCode").addEventListener('input', function(event) {  
		addCoreStockDetail.boxCode=	document.getElementById("boxCode").value 
	  }, false); 
 
</script>
 
</html>